import numpy  as np
import cv2

img=np.mat(np.zeros((300,300),dtype=np.uint8))
#将一维黑色图片转为三维图片
img=cv2.cvtColor(img,cv2.COLOR_GRAY2BGR)
print(img.shape)
cv2.imshow('test',img)
cv2.waitKey(0)
